home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / programming / other / flexcat / lib / sasasm_a.sd < prev    next >
Text File  |  1999-06-14  |  2KB  |  114 lines

  1. ##stringtype assembler
  2. ##shortstrings
  3. *****************************************************************
  4. *   This file was created automatically by `%fv'
  5. *   from "%f0".
  6. *   Do NOT edit by hand!
  7. *****************************************************************
  8.  
  9. *   Includefiles
  10.     include "exec/types.i"
  11.     include "utility/tagitem.i"
  12.     include "libraries/locale.i"
  13.  
  14. *   Function declarations
  15.     xdef    Open%bCatalog
  16.     xdef    Close%bCatalog
  17.     xdef    Get%bString
  18.  
  19. *   Referenced data
  20.     xref    _LocaleBase
  21.  
  22. *   Referenced functions
  23.     xref    _LVOOpenCatalogA
  24.     xref    _LVOCloseCatalog
  25.     xref    _LVOGetCatalogStr
  26.  
  27. *   Data definitions
  28.     section data
  29. OpenCatalogTags:
  30.     cnop    0,4
  31.     dc.l    OC_Language,0
  32.     dc.l    OC_BuiltInLanguage,%b_BuiltInLanguage
  33.     dc.l    OC_Version,%v
  34.     dc.l    TAG_DONE,0
  35.  
  36. %b_BuiltInLanguage:
  37.     %l,0
  38.  
  39. CatalogName:
  40.     dc.b    '%b.catalog',0
  41.  
  42. \tcnop\t0,4\n\txdef\t%i\n%i:\tdc.l\t%d\n\t%s,0
  43.  
  44.     section bss
  45.     cnop    0,4
  46. %b_Catalog:
  47.     ds.l    1
  48.  
  49.  
  50. *   Code definitions
  51.     section code
  52.  
  53. Open%bCatalog:
  54. *   a0 = Locale
  55. *   a1 = Language
  56.     movem.l a2/a6,-(sp)             ;   Save Regs
  57.  
  58.     lea    OpenCatalogTags,a2    ;   Store Language
  59.     move.l    a1,4(a2)
  60.     bne    Open%bCatalog1
  61.     lea    8(a2),a2
  62. Open%bCatalog1:
  63.     move.l    _LocaleBase,a6        ;   Call locale.OpenCatalog
  64.     move.l    a6,d0            ;   Locale opened?
  65.     beq    Open%bCatalogEnd    ;   No, skip
  66.     tst.l    %b_Catalog        ;   Catalog opened?
  67.     bne    Open%bCatalogEnd    ;   Yes, skip
  68.     lea    CatalogName,a1
  69.     jsr    _LVOOpenCatalogA(a6)
  70.     move.l    d0,%b_Catalog
  71. Open%bCatalogEnd:
  72.     movem.l (sp)+,a2/a6
  73.     rts
  74.  
  75.  
  76. Close%bCatalog:
  77.     move.l    a6,-(sp)
  78.     move.l    %b_Catalog,a0        ;   Close the Catalog, if needed
  79.     move.l    #0,%b_Catalog
  80.     move.l    _LocaleBase,a6
  81.     move.l    a6,d0            ;   Locale.library opened?
  82.     beq    Close%bCatalogEnd    ;   No, skip
  83.     jsr    _LVOCloseCatalog(a6)
  84. Close%bCatalogEnd:
  85.     move.l    (sp)+,a6
  86.     rts
  87.  
  88.  
  89. Get%bString:
  90. *   a0 = pointer to structure (ID, string)
  91.     move.l    a6,-(sp)                ;   Save regs
  92.  
  93.     move.l    (a0)+,d0                ;   Get string number
  94.     move.l    a0,a1            ;   Get default string
  95.  
  96. Get%bString3:
  97.     move.l    _LocaleBase,a6        ;   Locale.library present?
  98.     move.l    a6,d1
  99.     beq    Get%bStringNoLoc    ;   No, skip
  100.     move.l    %b_Catalog,a0        ;   Catalog opened?
  101.     move.l    a0,d1
  102.     beq    Get%bStringNoLoc    ;   No, skip
  103.  
  104.     jsr    _LVOGetCatalogStr(a6)   ;   Call locale.library
  105. Get%bStringEnd:
  106.     move.l    (sp)+,a6
  107.     rts
  108.  
  109. Get%bStringNoLoc:
  110.     move.l    a1,d0
  111.     bra    Get%bStringEnd
  112.  
  113.     end
  114.